﻿//------------------------------------------------------------------------------
// <pcdd-entitiy>
//     Redis缓存业务类库
//     特殊业务对象
// </pcdd-entitiy>
//------------------------------------------------------------------------------

using CL.Enum.Common;
using CL.Game.Entity;
using CL.Tools.RedisBase;
using System.Collections.Generic;

namespace CL.Redis.BLL
{
    /// <summary>
    /// SpecialRedis 业务
    /// </summary>
    public class SpecialRedis
    {
        /// <summary>
        /// 保存中奖类型
        /// </summary>
        /// <param name="LotteryCode"></param>
        /// <param name="PlayCode"></param>
        /// <param name="Entitys"></param>
        /// <returns></returns>
        public bool SetWinTypes(int LotteryCode, List<WinTypesEntity> Entitys)
        {
            string Key = string.Format("{0}:{1}", RedisKeysEnum.WinTypes, LotteryCode);
            return RedisHelper.Set_Entity(Key, Entitys);
        }
        /// <summary>
        /// 查询彩种中奖类型
        /// </summary>
        /// <param name="LotteryCode"></param>
        /// <returns></returns>
        public List<WinTypesEntity> QueryWinTypes(int LotteryCode)
        {
            string Key = string.Format("{0}:{1}", RedisKeysEnum.WinTypes, LotteryCode);
            return RedisHelper.Get_Entity<List<WinTypesEntity>>(Key);
        }
    }
}
